package com.example;

import org.greenrobot.greendao.generator.DaoGenerator;
import org.greenrobot.greendao.generator.Entity;
import org.greenrobot.greendao.generator.Schema;

public class MyDaoGenerator {

    public static void main(String[] args) throws Exception {
        Schema schema = new Schema(13, "com.dapeng.www.myapplication.db");
        addTest(schema);
        addTest2(schema);
        addTest3(schema);
        new DaoGenerator().generateAll(schema, "E:\\wgz\\code_private\\xiaohuangtiao\\GreenDaoUpGradehelper\\app\\src\\main\\java\\");
    }


    private static void addTest(Schema schema) {
        Entity testData = schema.addEntity("TestData");
        testData.addIdProperty().primaryKey().autoincrement();
        testData.addStringProperty("testString");
        testData.addLongProperty("testLong");
        testData.addDateProperty("testDate");
        testData.addIntProperty("testInt");
        testData.addBooleanProperty("testBoolean");
        testData.addBooleanProperty("testBoolean2");
        testData.addBooleanProperty("testBoolean3");
        testData.addBooleanProperty("testBoolean4");
    }
    private static void addTest2(Schema schema) {
        Entity testData = schema.addEntity("TestData2");
        testData.addIdProperty().primaryKey().autoincrement();
        testData.addStringProperty("testString");
        testData.addLongProperty("testLong");
        testData.addDateProperty("testDate");
        testData.addIntProperty("testInt");
        testData.addBooleanProperty("testBoolean");
    }
    private static void addTest3(Schema schema) {
        Entity testData = schema.addEntity("TestData3");
        testData.addIdProperty().primaryKey().autoincrement();
        testData.addStringProperty("testString");
        testData.addLongProperty("testLong");
        testData.addDateProperty("testDate");
        testData.addIntProperty("testInt");
        testData.addBooleanProperty("testBoolean");
    }
}
